package za.ac.wits.was.disciplines;

import java.io.Serializable;
import java.util.Set;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import org.codehaus.jackson.annotate.JsonIgnore;
import za.ac.wits.was.courses.Course;
import za.ac.wits.was.user.model.AcademicStaff;

/**
 *
 * @author Salman Noor : School of Electrical and Information Engineering
 * @Copyright: Wits University 2013 - All Rights Reserved
 * @email: salmannoor74415@gmail.com
 * @License: BSD License (http://www.linfo.org/bsdlicense.html)
 */
@Entity
@Table(name = "discipline")
public class Discipline implements Serializable {

    @Id
    @GeneratedValue(strategy = GenerationType.AUTO)
    @Column(name = "discipline_id")
    private Long discipline_id;
    
    @Column(name = "discipline_name")
    private String discipline_name;
    
    @Column(name = "discipline_code")
    private String discipline_code;
     
    @OneToMany(mappedBy="discipline",fetch= FetchType.LAZY)
    private Set<Course> courses;
    
    @OneToMany(mappedBy="discipline",fetch= FetchType.LAZY)
    private Set<AcademicStaff> academic_staff;

    public Long getDiscipline_id() {
        return discipline_id;
    }

    public void setDiscipline_id(Long discipline_id) {
        this.discipline_id = discipline_id;
    }

    public String getDiscipline_name() {
        return discipline_name;
    }

    public void setDiscipline_name(String discipline_name) {
        this.discipline_name = discipline_name;
    }

    public String getDiscipline_code() {
        return discipline_code;
    }

    public void setDiscipline_code(String discipline_code) {
        this.discipline_code = discipline_code;
    }
    @JsonIgnore
    public Set<Course> getCourses() {
        return courses;
    }
    @JsonIgnore
    public void setCourses(Set<Course> courses) {
        this.courses = courses;
    }
    @JsonIgnore
    public Set<AcademicStaff> getAcademic_staff() {
        return academic_staff;
    }
    @JsonIgnore
    public void setAcademic_staff(Set<AcademicStaff> academic_staff) {
        this.academic_staff = academic_staff;
    }
    
    
    
    
}
